import { isDev, getRequest, postRequest } from '@/api';

const urlsObj = {};
if (isDev) {
  // 审批任务
  urlsObj.getApproveList = getRequest('approvelist');
  urlsObj.updateApprove = getRequest('approveupdate');
  urlsObj.detailApprove = getRequest('approvedetail');
  urlsObj.verbApprove = getRequest('approveverb');
  urlsObj.deleteApprove = getRequest('approvedel');
  urlsObj.agreeApprove = getRequest('approveagree');
  urlsObj.rejectApprove = getRequest('approvereject');
  urlsObj.returnApprove = getRequest('approvereturn');
  urlsObj.revokeApprove = getRequest('approveback');
} else {
  // 审批任务
  urlsObj.getApproveList = postRequest('tasks/endorsement/list');
  urlsObj.updateApprove = postRequest('tasks/endorsement/update');
  urlsObj.detailApprove = getRequest('tasks/endorsement/detail/{endorsementType}/{orderNo}');
  urlsObj.verbApprove = postRequest('tasks/endorsement/verb');
  urlsObj.deleteApprove = postRequest('tasks/endorsement/del');
  urlsObj.agreeApprove = postRequest('tasks/endorsement/approve');
  urlsObj.rejectApprove = postRequest('tasks/endorsement/reject');
  urlsObj.returnApprove = postRequest('tasks/endorsement/return');
  urlsObj.revokeApprove = postRequest('tasks/endorsement/revoke');
}

export default urlsObj;
